******************************************************************
******************************************************************
*Neimanns, Erik: Unequal benefits - diverging attitudes? Analyzing the effects of an unequal expansion of childcare provision on attitudes towards maternal employment across 18 European countries
*Published in: Journal of Public Policy
*Stata do file for replication analysis
******************************************************************
******************************************************************

*********************************
*Load and prepare ISSP data sets (waves 2012 and 2002)
*********************************

*********************************
*ISSP2012: Downloaded from ZACAT - GESIS Online Study Catalogue: http://dx.doi.org/10.4232/1.12661
*********************************
use "C:\[...]\ZA5900_v4-0-0.dta"
gen weightall=WEIGHT
svyset [pweight=weightall]
gen year=2012

*country numbers (countryno): using countrycodes from ISSP2002
gen countryno=V3
recode countryno (32=.) (36=1) (40=7)(124=20)(152=31)(203=14) (208=32) (246=37) (250=28)(348=8)(352=40) (372=10)(376=22) (392=24)(410=41)(428=26)(484=38)(528=11) (578=12) (616=16)(643=18) (703=27) (705=15) (724=25) (752=13) (756=33)(792=42)(840=6) (27601=2) (27602=3)(5601=34) (62001 62002=30)(82601=4)  if year==2012
keep if countryno==1 |countryno==2 | countryno==3 | countryno==4 | countryno==5 |countryno==6 | countryno==7 | countryno==8| countryno==9 | countryno==10 | countryno==11 | countryno==12 | countryno==13 | countryno==14 | countryno==15 | countryno==16|countryno==18| countryno==19|countryno==20|countryno==22|countryno==24| countryno==25 |countryno==26 | countryno==27 | countryno==28| countryno==30 | countryno==31 | countryno==32 |countryno==33| countryno==34 |  countryno==37|countryno==38

*harmonize household income:
gen hhincome=.
*PT(30)
recode PT_INC (999997 999998=.)
gen hhincome_PT=PT_INC
recode hhincome_PT (0 305=1)(563 730=2)(907 1099 1303=3)( 1541 1856=4)( 2397 3108=5)
replace hhincome = hhincome_PT if countryno==30
*BE(34)
recode BE_INC (999999=.)
xtile hhincome_BEb = BE_INC [pweight=weightall] if countryno==34, nq(5)
replace hhincome = hhincome_BEb if countryno==34
*HU(8)
recode HU_INC (999999=.)
xtile hhincome_HUb = HU_INC [pweight=weightall] if countryno==8, nq(5)
replace hhincome = hhincome_HUb if countryno==8
*NL(11)
recode NL_INC (999999=.)
gen hhincome_NL=NL_INC
recode hhincome_NL (0 500 875 1125=1)(1375 1625 1875=2)(2125 2375=3)(2750 3250=4)(3750 4500 5500=5)
replace hhincome = hhincome_NL if countryno==11
*DE
recode DE_INC (999990=.) (999997=.) (999999=.)
*West: countryno==2
*East: countryno==3
gen DEE_INC=DE_INC if countryno==3
replace DE_INC=. if countryno==3
*West:
pctile hhincome_DE = DE_INC [pweight=weightall] if countryno==2, nq(5)
xtile hhincome_DEb = DE_INC [pweight=weightall] if countryno==2, nq(5)
replace hhincome=hhincome_DEb if countryno==2
drop hhincome_DE hhincome_DEb
*East:
pctile hhincome_DEE = DEE_INC [pweight=weightall] if countryno==3, nq(5)
xtile hhincome_DEEb = DEE_INC [pweight=weightall] if countryno==3, nq(5)
replace hhincome=hhincome_DEEb if countryno==3
drop hhincome_DEE hhincome_DEEb
*GB(4):
recode GB_INC  (999990=.)(999997=.)(999998=.)
replace hhincome=GB_INC if countryno==4
recode hhincome (590=1)(910=1)(1200=2)(1500=2)(1900=3)(2400=3)(3000=4)(3700=4)(4800=5)(7200=5)  if countryno==4
*AT(7): 
recode AT_INC  (999990=.)(999997=.)(999999=.)
replace hhincome=AT_INC if countryno==7
recode hhincome (150=1)(450=1)(750=1)(1050=1)(1350=2)(1650=3)(1950=3)(2300=4)(2750=4)(3500=5)(4500=5)  if countryno==7
*IE(10): 
recode IE_INC  (999990=.)(999997=.)(999998=.)(999999=.)
xtile hhincome_IEb = IE_INC [pweight=weightall] if countryno==10, nq(5)
replace hhincome=hhincome_IEb if countryno==10
drop hhincome_IE hhincome_IEb
*NO(12): 
recode NO_INC  (99999990=.)(99999999=.)
xtile hhincome_NOb = NO_INC [pweight=weightall] if countryno==12, nq(5)
replace hhincome=hhincome_NOb if countryno==12
drop  hhincome_NOb
*SE(13): 
recode SE_INC  (999990=.)(999999=.)
pctile hhincome_SE = SE_INC [pweight=weightall] if countryno==13, nq(5)
xtile hhincome_SEb = SE_INC [pweight=weightall] if countryno==13, nq(5)
replace hhincome=hhincome_SEb if countryno==13
drop hhincome_SE hhincome_SEb
*CZ(14): 
recode CZ_INC  (999990=.)(999998=.)(999999=.)
xtile hhincome_CZb = CZ_INC [pweight=weightall] if countryno==14, nq(5)
replace hhincome=hhincome_CZb if countryno==14
drop hhincome_CZb
*SI(15): 
recode SI_INC  (999990=.)(999997=.)(999998=.)(999999=.)
xtile hhincome_SIb = SI_INC [pweight=weightall] if countryno==15, nq(5)
replace hhincome=hhincome_SIb if countryno==15
drop hhincome_SIb
*PL(16): 
recode PL_INC  (999990=.)(999997=.)(999998=.)(999999=.)
xtile hhincome_PLb = PL_INC [pweight=weightall] if countryno==16, nq(5)
replace hhincome=hhincome_PLb if countryno==16
drop  hhincome_PLb
*ES(25): 
recode ES_INC  (999990=.)(999997=.)(999998=.)(999999=.)
replace hhincome=ES_INC if countryno==25
recode hhincome (0=1)(250=1)(450=1)(750=1)(1050=2)(1500=3)(2100=4)(2700=5)(3750=5)(5250=5)(7000=5)  if countryno==25
*SK(27): 
recode SK_INC  (999990=.)(999997=.)(999998=.)(999999=.)
xtile hhincome_SKb = SK_INC [pweight=weightall] if countryno==27, nq(5)
replace hhincome=hhincome_SKb if countryno==27
drop  hhincome_SKb
*FR(28): 
recode FR_INC  (999990=.)(999997=.)(999998=.)(999999=.)
xtile hhincome_FRb = FR_INC [pweight=weightall] if countryno==28, nq(5)
replace hhincome=hhincome_FRb if countryno==28
drop hhincome_FRb
*DK(32): 
recode DK_INC  (9999990=.)(9999997=.)(9999998=.)(9999999=.)
xtile hhincome_DKb = DK_INC [pweight=weightall] if countryno==32, nq(5)
replace hhincome=hhincome_DKb if countryno==32
drop hhincome_DKb
*FI(37): 
recode FI_INC  (999990=.)(999997=.)(999998=.)(999999=.)
xtile hhincome_FIb = FI_INC [pweight=weightall] if countryno==37, nq(5)
replace hhincome=hhincome_FIb if countryno==37
drop  hhincome_FIb

*coding dependent variable: attitudes towards maternal employment: higher values indicate more egalitarian attitudes
gen flfp_v3a=V12 if year==2012
recode flfp_v3a (1=2) (2=1) (3=0) (8=.) (9=.)
*recode dependent variable as binary 
gen flfp_v3a_logit=flfp_v3a
recode flfp_v3a_logit (2=1)

*individual-level control variables: 
gen female=SEX
recode female (1=0) (2=1) (9=.)

recode AGE (999=.)
rename AGE age

*educational degree: 1: low; 2:mid; 3:high; 4:mis/other
gen educ=DEGREE
recode educ (0=1) (2=1) (3=2) (4=2) (5=3) (6=3) (9=4)(.=4)

*in paid work 
gen paidwork=WORK
recode paidwork (2=0) (3=0) (9=.)

*living w/ partner: 0:no; 1:yes; 2:other/mis
gen partner=PARTLIV
recode partner (0=2)(1=1)(2=0)(3=0)(7=2)(9=2)(.=2)
*DK (V67)
replace partner=1 if V67<=65 & countryno==32
replace partner=0 if V67==99 & countryno==32
*GB (V48):
replace partner=0 if V48==0 & countryno==4
replace partner=1 if V48>0 & V48<8 & countryno==4

*living w/ children or toddlers: 0: no; 1:one or more; 2: other/mis
gen toddlers=HHTODD
recode toddlers (1 2 3 4 5 6 7 8 9=1)(99=2)
gen kids=HHCHILDR
recode kids (1 2 3 4 5 6 7 8 9 18 21=1)(99=2)
replace toddlers=0 if toddlers==2 & HOMPOP==1
replace kids=0 if kids==2 & HOMPOP==1
replace toddlers=0 if toddlers==2 & HOMPOP==2 & PARTLIV==1
replace kids=0 if kids==2 & HOMPOP==2 & PARTLIV==1

*hoursworked
gen hoursworked=WRKHRS
recode hoursworked (97 98 99=.)
replace hoursworked=0 if hoursworked==. &  (WORK==2 | WORK==3)

*hoursworked (partner)
gen hoursworked_p=SPWRKHRS
recode hoursworked_p (97 98 99=.)
replace hoursworked_p=0 if hoursworked_p==. &  (SPWORK==2 | SPWORK==3)

*in paid work, partner: 
gen paidwork_p=SPWORK
recode paidwork_p (2=0) (3=0) (8 9=.)

*categorical coding of paidwork & paidwork_p: 0:not employed; 1:part-time (>0&<30h); 2:full-time(>=30h)
gen paidwork_cat=paidwork
replace paidwork_cat=2 if hoursworked>=30 & hoursworked<.

gen paidwork_cat_p=paidwork_p
replace paidwork_cat_p=2 if hoursworked_p>=30 & hoursworked_p<.
*missing in GB (coded as full-time)
recode paidwork_cat_p (1=2) if V4==826

*code final partner & partner employment variable: 0: no partner; 1: yes, partner not working; 2: partner working part-time, 3: partner working full-time; 4:other/mis
gen partner_new=partner
recode partner_new (2=4)
replace partner_new=1 if paidwork_cat_p==0 & partner==1
replace partner_new=2 if paidwork_cat_p==1 & partner==1
replace partner_new=3 if paidwork_cat_p==2 & partner==1

*code partner_educ (V65):
recode V65 (. 9 99 990=0)(0 1 2=1)(3 4=2)(5 6=3)
gen partner_educ=V65 

*code relative income (V50):
*0: no partner; NA,...; 1: no own income; 2: partner has more; 3: same; 4: self more; 5: only self
gen rel_inc=V50
recode rel_inc (. 98 99=0)(7=1)(5 6 =2)(4=3)(2 3=4)(1=5)

*religious attendance: 0:no; 1:yes (if more than once a year); 2: other/mi
gen religious=ATTEND
recode religious (0 6 7 8=0)(1 2 3 4 5=1)(97 98 99=.)
replace religious=0 if RELIGGRP==0
replace religious=2 if religious==.

*correctly assign missing values:
recode  educ (4=.)
recode  partner_new (4=.)
recode  kids (2=.)
recode  toddlers (2=.)
recode  religious (2=.)

save "C:\[...]\issp2012.dta", replace
clear

*********************************
*ISSP2002: Downloaded from ZACAT - GESIS Online Study Catalogue: http://dx.doi.org/10.4232/1.11564
*********************************
use "C:\[...]\ZA3880_v1-1-0.dta"
gen weightall=v361
svyset [pweight=weightall]
gen year=2002

*country numbers (countryno): 
gen countryno=COUNTRY
keep if countryno==1 |countryno==2 | countryno==3 | countryno==4 | countryno==5 |countryno==6 | countryno==7 | countryno==8| countryno==9 | countryno==10 | countryno==11 | countryno==12 | countryno==13 | countryno==14 | countryno==15 | countryno==16|countryno==18| countryno==19|countryno==20|countryno==22|countryno==24| countryno==25 |countryno==26 | countryno==27 | countryno==28| countryno==30 | countryno==31 | countryno==32 |countryno==33| countryno==34 |  countryno==37|countryno==38

*harmonize household income:
gen hhincome=v250
recode hhincome (999997=.)(999998=.)(999999=.)
*Germany: 
*West: countryno==2
xtile hhincome_DE = hhincome [pweight=weightall] if countryno==2, nq(5)
replace hhincome=hhincome_DE if countryno==2
drop hhincome_DE 
*East: countryno==3
xtile hhincome_DEE = hhincome [pweight=weightall] if countryno==3, nq(5)
replace hhincome=hhincome_DEE if countryno==3
drop hhincome_DEE 
*GB(-NI) 
*GB: countryno==4
xtile hhincome_GB = hhincome [pweight=weightall] if countryno==4, nq(5)
replace hhincome=hhincome_GB if countryno==4
drop hhincome_GB
*GB-NI: countryno==5
xtile hhincome_GB_NI = hhincome [pweight=weightall] if countryno==5, nq(5)
replace hhincome=hhincome_GB_NI if countryno==5
drop hhincome_GB_NI
*AT(7): 
xtile hhincome_AT = hhincome [pweight=weightall] if countryno==7, nq(5)
replace hhincome=hhincome_AT if countryno==7
drop hhincome_AT 
*HU(8): 
xtile hhincome_HU = hhincome [pweight=weightall] if countryno==8, nq(5)
replace hhincome=hhincome_HU if countryno==8
drop hhincome_HU 
*IE(10): 
xtile hhincome_IE = hhincome [pweight=weightall] if countryno==10, nq(5)
replace hhincome=hhincome_IE if countryno==10
drop hhincome_IE 
*NL(11): 
xtile hhincome_NL = hhincome [pweight=weightall] if countryno==11, nq(5)
replace hhincome=hhincome_NL if countryno==11
drop hhincome_NL 
*NO(12): 
xtile hhincome_NOb = hhincome [pweight=weightall] if countryno==12, nq(5)
replace hhincome=hhincome_NOb if countryno==12
drop  hhincome_NOb
*SE(13): 
xtile hhincome_SEb = hhincome [pweight=weightall] if countryno==13, nq(5)
replace hhincome=hhincome_SEb if countryno==13
drop  hhincome_SEb
*CZ(14): 
xtile hhincome_CZb = hhincome [pweight=weightall] if countryno==14, nq(5)
replace hhincome=hhincome_CZb if countryno==14
drop hhincome_CZb
*SI(15): 
xtile hhincome_SIb = hhincome [pweight=weightall] if countryno==15, nq(5)
replace hhincome=hhincome_SIb if countryno==15
drop hhincome_SIb
*PL(16): 
xtile hhincome_PLb = hhincome [pweight=weightall] if countryno==16, nq(5)
replace hhincome=hhincome_PLb if countryno==16
drop  hhincome_PLb
*ES(25): 
xtile hhincome_ES = hhincome [pweight=weightall] if countryno==25, nq(5)
replace hhincome=hhincome_ES if countryno==25
drop  hhincome_ES
*SK(27):  
xtile hhincome_SKb = hhincome [pweight=weightall] if countryno==27, nq(5)
replace hhincome=hhincome_SKb if countryno==27
drop  hhincome_SKb
*FR(28): 
xtile hhincome_FRb = hhincome [pweight=weightall] if countryno==28, nq(5)
replace hhincome=hhincome_FRb if countryno==28
drop hhincome_FRb
*PT(30)
recode hhincome (200=1)(400=2)(650=3)(1150=4)(2000 3000=5) if countryno==30
*DK(32): 
xtile hhincome_DKb = hhincome [pweight=weightall] if countryno==32, nq(5)
replace hhincome=hhincome_DKb if countryno==32
drop hhincome_DKb
*BE(34)
xtile hhincome_BEb = hhincome [pweight=weightall] if countryno==34, nq(5)
replace hhincome=hhincome_BEb if countryno==34
drop hhincome_BEb
*FI(37): 
xtile hhincome_FIb = hhincome [pweight=weightall] if countryno==37, nq(5)
replace hhincome=hhincome_FIb if countryno==37
drop  hhincome_FIb

*coding dependent variable: attitudes towards maternal employment: higher values indicate more egalitarian attitudes
gen flfp_v3a=v15
recode flfp_v3a (1=2) (2=1) (3=0)
*recode dependent variable as binary 
gen flfp_v3a_logit=flfp_v3a
recode flfp_v3a_logit (2=1)

*individual-level control variables: 
gen female=v200
recode female (1=0) (2=1)

gen age=v201

*educational degree: 1: low; 2:mid; 3:high; 4:mis/other
gen educ=v205
recode educ (0=1) (2=1) (3=2) (4=2) (5=3) (.n=4)

*in paid work 
gen paidwork=v239
recode paidwork (2=1)(3=1)(4=0)(5=0)(6=0)(7=0)(8=0)(9=0)(10=0)(.a=.)

*living w/ partner: 0:no; 1:yes; 2:other/mis
*v202, v203 
gen partner=v202
recode partner (1=1)(2 3 4 5=0)(.n=.)
replace partner=1 if partner==. & v203==1
replace partner=0 if partner==. & v203==2
recode partner (.=2)

*living w/ children(v66) or toddlers(v67): 0: no; 1:one or more; 2: other/mis
 *v251 (number of persons in household)
gen toddlers=v67
recode toddlers (1 2 3 4 5 6 7 8 9=1)(.a=2)(.n=0)
gen kids=v66
recode kids (1 2 3 4 5 6 7 8 9 10=1)(.a=2)(.n=0)
replace toddlers=0 if toddlers==2 & v251==1
replace kids=0 if kids==2 & v251==1
replace toddlers=0 if toddlers==2 & v251==2 & partner==1
replace kids=0 if kids==2 & v251==2 & partner==1
*code IE(COUNTRY==10) separately
 *v252 (household composition: children & adults);
gen kids_IE=v252
recode kids_IE (1=0)(2=1)(3=2)(4=2)(5=0)(6=1)(7=2)(8=2)(9=0)(10=2)(11=0)(12=2)(13=0)(14=2)(15=0)(16=2)(17=0)(18=2)(19=0)(20=2)(21=0)(22=2)(23=0)(24=2)(25=0)(26=2)(27=0)
recode kids_IE (2=1)(95 .a=2)(.n=0)
replace toddlers=kids_IE if COUNTRY==10 
replace kids=kids_IE if COUNTRY==10 

*hoursworked
gen hoursworked=v240
recode hoursworked (.a=.)(.n=0)

*hoursworked (partner)
 *missing for SK, SI, CZ, IE, GB-NI,  (use v246 for categorical coding of partner´s employment status below)
gen hoursworked_p=v71
recode hoursworked_p (.a=.)(.n=0)

*in paid work, partner:
gen paidwork_p=v246
recode paidwork_p (2 3=1) (3 4 5 6 7 8 9 10 .n=0) (.a=.)
*NL: (v71: partner´s hours worked)
replace  paidwork_p=0 if v71==.n & countryno==11
replace  paidwork_p=1 if v71>0 & v71<. & countryno==11

*categorical coding of paidwork & paidwork_p: 0:not employed; 1:part-time (>0&<30h); 2:full-time(>=30h)
gen paidwork_cat=paidwork
replace paidwork_cat=2 if hoursworked>=30 & hoursworked<.
*v239 (respondent´s employment status)
replace paidwork_cat=2 if paidwork_cat==. &  (v239==1)
replace paidwork_cat=1 if paidwork_cat==. &  (v239==2|v239==3)

gen paidwork_cat_p=paidwork_p
replace paidwork_cat_p=2 if hoursworked_p>=30 & hoursworked_p<.
*v246 (partner´s employment status)
replace paidwork_cat_p=2 if paidwork_cat_p==. &  (v246==1)
replace paidwork_cat_p=1 if paidwork_cat_p==. &  (v246==2|v246==3)
*correct for missings for SK, SI, CZ, IE, GB-NI  
replace paidwork_cat_p=2 if   (v246==1) & (countryno==27 |countryno==15 |countryno==14 |countryno==10 |countryno==5  )
replace paidwork_cat_p=1 if   (v246==2|v246==3) & (countryno==27 |countryno==15 |countryno==14 |countryno==10 |countryno==5  )

*code final partner & partner employment variable: 0: no partner; 1: yes, partner not working; 2: partner working part-time, 3: partner working full-time; 4:other/mis
gen partner_new=partner
recode partner_new (2=4)
replace partner_new=1 if paidwork_cat_p==0 & partner==1
replace partner_new=2 if paidwork_cat_p==1 & partner==1
replace partner_new=3 if paidwork_cat_p==2 & partner==1

*code partner_educ (v70):
recode v70 (. .a .n 6 7 8 9 99 990=0)(0 1 2=1)(3 4=2)(5=3)
gen partner_educ= v70 

*code relative income (v43):
*0: no partner; NA,...; 1: no own income; 2: partner has more; 3: same; 4: self more; 5: only self
gen rel_inc=v43
recode rel_inc (. .a .n=0)(7=1)(5 6 =2)(4=3)(2 3=4)(1=5)

*religious attendance: 0:no; 1:yes (if more than once a year); 2: other/mi
gen religious=v290
recode religious (0 6 7 8 .n=0)(1 2 3 4 5=1)(.a=.)
replace religious=0 if v289==0
replace religious=2 if religious==.

*correctly assign missing values:
recode  educ (4=.)
recode  partner_new (4=.)
recode  kids (2=.)
recode  toddlers (2=.)
recode  religious (2=.)

save "C:\[...]\issp2002.dta", replace
clear



*********************************
*merge ISSP waves 2002 & 2012:
*********************************
use "C:\[...]\issp2012.dta"
append using "C:\[...]\issp2002.dta", force 
svyset [pweight=weightall]

*assign DE-E to DE and GB-NI to GB 
replace countryno=2 if countryno==3
replace countryno=4 if countryno==5
*drop countries for which no macro data is available:
drop if countryno==1 | countryno==6 | countryno==18 |countryno==19 | countryno==20| countryno==22| countryno==24| countryno==26|countryno==31 |countryno==33  | countryno==38 


*********************************
*code additional variables:
*********************************

*generate weighted means of dependent variable for summary statistics:
bysort countryno year: asgen flfp_v3a_logit_cmean = flfp_v3a_logit, weight(weightall) 

*generate dummy variables
tab rel_inc,gen(rel_inc)
tab partner_educ,gen(partner_educ)
tab partner_new,gen(partner_new)

*wave: 
gen wave=year
recode wave (2002=3) (2012=4)
*countryindex
by countryno, sort: gen countryindex=_n
*countrywaveindex
by countryno wave, sort: gen countrywaveindex=_n
*countryyearno:
egen countryyearno=group(countryno wave)


*assign labels 
label define countryno 1"AUS"2"DE"3"DE-E"4"UK"5"GB-NI"6"US"7"AT"8"HU"9"IT"10"IE"11"NL"12"NO"13"SE"14"CZ"15"SI"16"PL"17"BG"18"RU"19"NZ"20"CA"22"IL"24"JP"25"ES"26"LV"27"SK"28"FR"30"PT"31"CL"32"DK"33"CH"34"BE"37"FI", replace
label values countryno countryno

label define hhincome 1"Q1"2"Q2"3"Q3"4"Q4"5"Q5"
label values hhincome hhincome


*********************************
*code macro-level variables: 
*********************************
 *label define countryno 2"DE" 4"UK" 7"AT" 8"HU"  10"IE" 11"NL" 12"NO" 13"SE" 14"CZ" 15"SI" 16"PL"  25"ES" 27"SK" 28"FR" 30"PT"  32"DK" 34"BE" 37"FI" , replace

*********************************
*Public childcare spending (OECD Family Database: http://www.oecd.org/els/family/database.htm: PF3.1 Public spending on childcare and early education): 2002 and 2012
gen cc_exp02=countryno
recode cc_exp02 ///
(	2	=	0.36	)	///
(	4	=	0.77	)	///
(	7	=	0.27	)	///
(	8	=	0.61	)	///
(	10	=	0.24	)	///
(	11	=	0.38	)	///
(	12	=	0.62	)	///
(	13	=	1.13	)	///
(	14	=	0.32	)	///
(	15	=	0.57	)	///
(	16	=	0.21	)	///
(	25	=	0.39	)	///
(	27	=	0.46	)	///
(	28	=	1.16	)	///
(	30	=	0.31	)	///
(	32	=	1.38	)	///
(	34	=	0.60	)	///
(	37	=	0.89	)	
 
gen cc_exp12=countryno
recode cc_exp12 /// 
(	2	=	0.52	)	///
(	4	=	0.78	)	///
(	7	=	0.48	)	///
(	8	=	0.63	)	///
(	10	=	0.49	)	///
(	11	=	0.74	)	///
(	12	=	1.21	)	///
(	13	=	1.58	)	///
(	14	=	0.44	)	///
(	15	=	0.52	)	///
(	16	=	0.45	)	///
(	25	=	0.56	)	///
(	27	=	0.44	)	///
(	28	=	1.24	)	///
(	30	=	0.38	)	///
(	32	=	1.39	)	///
(	34	=	0.73	)	///
(	37	=	1.10	)	

*generate country mean values and period-specific deviations from those mean values 
gen cc_exp_cmean=(cc_exp02+cc_exp12)/2 
gen cc_exp_cmeandev=cc_exp12-cc_exp_cmean if year==2012
replace cc_exp_cmeandev=cc_exp02-cc_exp_cmean if year==2002 
*mean center average public childcare spending:
gen cc_exp_cmean_mc=cc_exp_cmean-.6763889
*multiply by 10 to ease interpretation: a one unit change implies a change in public childcare spending by 0.1 percentage points of GDP
gen cc_exp_cmean_mc10=cc_exp_cmean_mc*10
gen cc_exp_cmeandev10=cc_exp_cmeandev*10

*change in spending between 2002 and 2012:
gen cc_exp_delta=cc_exp12 - cc_exp02

*********************************
*Full-time equivalent childcare enrolment rates in 2006 and 2012 (Van Lancker 2018: 281, Table 2):
gen cc_use_vl06=countryno
recode cc_use_vl06 ///
(	2	=	17	)	///
(	4	=	19	)	///
(	7	=	11	)	///
(	8	=	10	)	///
(	10	=	18	)	///
(	11	=	30	)	///
(	12	=	38	)	///
(	13	=	46	)	///
(	14	=	2	)	///
(	15	=	31	)	///
(	16	=	8	)	///
(	25	=	38	)	///
(	27	=	9	)	///
(	28	=	38	)	///
(	30	=	43	)	///
(	32	=	72	)	///
(	34	=	48	)	///
(	37	=	26	)	

gen cc_use_vl12=countryno
recode cc_use_vl12 ///
(	2	=	31	)	///
(	4	=	12	)	///
(	7	=	17	)	///
(	8	=	10	)	///
(	10	=	21	)	///
(	11	=	34	)	///
(	12	=	44	)	///
(	13	=	51	)	///
(	14	=	6	)	///
(	15	=	43	)	///
(	16	=	12	)	///
(	25	=	32	)	///
(	27	=	5	)	///
(	28	=	46	)	///
(	30	=	44	)	///
(	32	=	67	)	///
(	34	=	49	)	///
(	37	=	30	)	

*generate country mean values
gen cc_use_vl_cmean= (cc_use_vl06 + cc_use_vl12)/2
*change between 2006 and 2012:
gen cc_use_vl_delta=cc_use_vl12-cc_use_vl06 


*********************************
*Relative index of inequality in childcare use in 2006 and 2012 (Van Lancker 2018: 281, Table 2):
gen vl18_rii06=countryno
recode vl18_rii06 ///
(	2	=	0.115	)	///
(	4	=	0.376	)	///
(	7	=	0.205	)	///
(	8	=	0.338	)	///
(	10	=	0.582	)	///
(	11	=	0.283	)	///
(	12	=	0.141	)	///
(	13	=	0.038	)	///
(	14	=	0.261	)	///
(	15	=	0.107	)	///
(	16	=	0.53	)	///
(	25	=	0.204	)	///
(	27	=	0.206	)	///
(	28	=	0.386	)	///
(	30	=	0.064	)	///
(	32	=	0.03	)	///
(	34	=	0.175	)	///
(	37	=	0.257	)	

gen vl18_rii12=countryno
recode vl18_rii12 ///
(	2	=	0.158	)	///
(	4	=	0.521	)	///
(	7	=	0.072	)	///
(	8	=	0.159	)	///
(	10	=	0.611	)	///
(	11	=	0.248	)	///
(	12	=	0.16	)	///
(	13	=	0.049	)	///
(	14	=	0.3	)	///
(	15	=	0.036	)	///
(	16	=	0.497	)	///
(	25	=	0.256	)	///
(	27	=	0.171	)	///
(	28	=	0.273	)	///
(	30	=	0.092	)	///
(	32	=	0.07	)	///
(	34	=	0.228	)	///
(	37	=	0.224	)	

*generate country mean values and period-specific deviations from those mean values 
gen vl18_rii_cmean=(vl18_rii06+vl18_rii12)/2
gen vl18_rii_cmeandev = vl18_rii06 - vl18_rii_cmean if year==2002
replace vl18_rii_cmeandev = vl18_rii12 - vl18_rii_cmean if year==2012

*mean center relative index of inequality in childcare use
gen vl18_rii_cmean_mc=vl18_rii_cmean-.2339722
*multiply by 10 to ease interpretation: a one unit change implies a change in the index by 0.1 points
gen vl18_rii_cmean_mc10=vl18_rii_cmean_mc*10
gen vl18_rii_cmeandev10=vl18_rii_cmeandev*10

*change in inequality between 2006 and 2012:
gen vl18_rii_delta=vl18_rii12 - vl18_rii06

*********************************
*Female labour force participation rates in 2002 and 2012 (OECD Labour Force Survey: doi: 10.1787/8a801325-en)
gen flfp02=countryno
recode flfp02 ///
(	2	=	64.23	)	///
(	4	=	69.32	)	///
(	7	=	63.67	)	///
(	8	=	52.69	)	///
(	10	=	57.53	)	///
(	11	=	66.80	)	///
(	12	=	76.75	)	///
(	13	=	77.05	)	///
(	14	=	62.80	)	///
(	15	=	62.97	)	///
(	16	=	58.93	)	///
(	25	=	54.67	)	///
(	27	=	63.19	)	///
(	28	=	62.58	)	///
(	30	=	65.56	)	///
(	32	=	75.46	)	///
(	34	=	56.27	)	///
(	37	=	72.73	)	

gen flfp12=countryno
recode flfp12 ///
(	2	=	71.74	)	///
(	4	=	70.98	)	///
(	7	=	70.34	)	///
(	8	=	58.32	)	///
(	10	=	62.19	)	///
(	11	=	74.27	)	///
(	12	=	75.91	)	///
(	13	=	77.92	)	///
(	14	=	63.50	)	///
(	15	=	66.91	)	///
(	16	=	59.72	)	///
(	25	=	69.26	)	///
(	27	=	61.67	)	///
(	28	=	66.63	)	///
(	30	=	69.72	)	///
(	32	=	75.79	)	///
(	34	=	61.34	)	///
(	37	=	73.39	)	

*generate country mean values and period-specific deviations from those mean values 
gen flfp_cmean=(flfp02+flfp12)/2 
gen flfp_cmeandev=flfp12-flfp_cmean if year==2012
replace flfp_cmeandev=flfp02-flfp_cmean if year==2002

*********************************
*Unemployment rates in 2002 and 2012 (OECD Labour Force Survey: doi: 10.1787/997c8750-en):
 *label define countryno 2"DE" 4"UK" 7"AT" 8"HU"  10"IE" 11"NL" 12"NO" 13"SE" 14"CZ" 15"SI" 16"PL"  25"ES" 27"SK" 28"FR" 30"PT"  32"DK" 34"BE" 37"FI" , replace
gen ue02=countryno
recode ue02 (2=8.653863)(4=5.132106)(7=3.951978)(8=5.829966)(10=4.443757)(11=2.755692)(12=3.760192)(13=5.072618)(14=7.313614)(15=6.310935)(16=19.93272)(25=11.44908)(27=18.67133)(28=8.099563)(30=4.993313)(32=4.586689)(34=7.511277)(37=9.081173) 
gen ue12=countryno
recode ue02 (2=5.380757)(4=7.885344)(7=4.863267)(8=11.00812)(10=15.44939)(11=5.820699)(12=3.123188)(13=7.975423)(14=6.977849)(15=8.838806)(16=10.08882)(25=24.78815)(27=13.96335)(28=9.399351)(30=15.53028)(32=7.524072)(34=7.537931)(37=7.68181) 
*generate country mean values and period-specific deviations from those mean values 
gen ue_mean=(ue02+ue12)/2
gen ue_dev=ue12-ue_mean if year==2012
replace ue_dev=ue02-ue_mean if year==2002


*********************************
*Analysis: 
*********************************
set scheme plotplain, perma

*Figure 1:
scatter vl18_rii_cmean cc_exp_cmean    if countrywaveindex==1 & year==2012, name(fig1a, replace)  mlabel(countryno ) xtitle("Public childcare spending (% of GDP)") ytitle("Social inequality in childcare enrolment")
scatter vl18_rii_delta cc_exp_delta    if countrywaveindex==1 & (year==2012) , mlabel(countryno) name(fig1b, replace)  xtitle("Change in public childcare spending (% of GDP)") ytitle("Change in inequality") xline(0) yline(0)
graph combine fig1a fig1b, title("Inequality and public spending") name(fig1v1, replace) 

scatter vl18_rii_cmean cc_use_vl_cmean    if countrywaveindex==1 & year==2012, name(fig1a, replace)  mlabel(countryno )   xtitle("Childcare enrolment rates") ytitle("Social inequality in childcare enrolment")
scatter vl18_rii_delta cc_use_vl_delta    if countrywaveindex==1 & (year==2012) , mlabel(countryno) name(fig1b, replace)  xtitle("Change in childcare enrolment rates") ytitle("Change in inequality") xline(0) yline(0)
graph combine fig1a fig1b, name(fig1v2, replace) title("Inequality and enrolment rates")

graph combine fig1v1 fig1v2, name(figure1, replace) row(2)


*Table 1
*M1
melogit flfp_v3a_logit ib3.hhincome ib3.educ i.paidwork_cat i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6  age i.female i.kids i.toddlers i.religious  i.wave   ||countryno: ||countryyearno: 
*M2
melogit flfp_v3a_logit ib3.hhincome ib3.educ i.paidwork_cat i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6  age i.female i.kids i.toddlers i.religious  i.wave c.cc_exp_cmean_mc10 c.cc_exp_cmeandev10    ||countryno: ||countryyearno: 
*M3
melogit flfp_v3a_logit ib3.hhincome ib3.educ i.paidwork_cat i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6  age i.female i.kids i.toddlers i.religious  i.wave c.cc_exp_cmean_mc10 c.cc_exp_cmeandev10 c.vl18_rii_cmean_mc10 c.vl18_rii_cmeandev10   ||countryno: ||countryyearno: 
*M4
melogit flfp_v3a_logit ib3.hhincome ib3.educ i.paidwork_cat i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6  age i.female i.kids i.toddlers i.religious  i.wave##c.cc_exp_cmean_mc10 c.cc_exp_cmeandev10 i.wave##c.vl18_rii_cmean_mc10 c.vl18_rii_cmeandev10   ||countryno: ||countryyearno: 


*Figure 2
*low inequality, pooled sample
melogit flfp_v3a_logit ib3.educ  age i.female i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6 i.kids i.toddlers  i.paidwork_cat i.religious  i.wave c.cc_exp_cmean_mc10 c.vl18_rii_cmeandev10 c.vl18_rii_cmean_mc10##c.cc_exp_cmeandev10##ib3.hhincome    ||countryno: ||countryyearno: 
margins, dydx(cc_exp_cmeandev)  at(hhincome=(1(1)5) vl18_rii_cmean_mc10=(-1.8  ))
marginsplot, name(f2, replace) recast(line) ciopts(recast(rline) lpattern(dash))  yline(0) title("Pooled sample") ytitle("")
*low inequality, women<45
melogit flfp_v3a_logit ib3.educ  age  i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6 i.kids i.toddlers  i.paidwork_cat i.religious  i.wave c.cc_exp_cmean_mc10 c.vl18_rii_cmeandev10 c.vl18_rii_cmean_mc10##c.cc_exp_cmeandev10##ib3.hhincome if   female==1 & age<=45 ||countryno: ||countryyearno: 
margins, dydx(cc_exp_cmeandev)  at(hhincome=(1(1)5) vl18_rii_cmean_mc10=(-1.8  ))
marginsplot, name(f2women, replace) recast(line) ciopts(recast(rline) lpattern(dash))  yline(0) title("Women below age 45") ytitle("")
graph combine f2 f2women , name(f2comb1, replace) ycommon row(1) title("Low inequality")
*high inequality, pooled sample
melogit flfp_v3a_logit ib3.educ  age i.female i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6 i.kids i.toddlers  i.paidwork_cat i.religious  i.wave c.cc_exp_cmean_mc10 c.vl18_rii_cmeandev10 c.vl18_rii_cmean_mc10##c.cc_exp_cmeandev10##ib3.hhincome    ||countryno: ||countryyearno: 
margins, dydx(cc_exp_cmeandev)  at(hhincome=(1(1)5) vl18_rii_cmean_mc10=(2.8 ))
marginsplot, name(f2, replace) recast(line) ciopts(recast(rline) lpattern(dash))  yline(0) title("Pooled sample") ytitle("")
*high inequality, women<45
melogit flfp_v3a_logit ib3.educ  age  i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6 i.kids i.toddlers  i.paidwork_cat i.religious  i.wave c.cc_exp_cmean_mc10 c.vl18_rii_cmeandev10 c.vl18_rii_cmean_mc10##c.cc_exp_cmeandev10##ib3.hhincome if   female==1 & age<=45 ||countryno: ||countryyearno: 
margins, dydx(cc_exp_cmeandev)  at(hhincome=(1(1)5) vl18_rii_cmean_mc10=(2.8 ))
marginsplot, name(f2women, replace) recast(line) ciopts(recast(rline) lpattern(dash))  yline(0) title("Women below age 45") ytitle("")
graph combine f2 f2women, name(f2comb2, replace) ycommon row(1) title("High inequality")

graph combine f2comb1 f2comb2 , name(figure2, replace) ycommon row(2)

*Figure 3
*low inequality
melogit flfp_v3a_logit i.educ age i.female i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6 i.kids i.toddlers  i.paidwork_cat i.religious c.cc_exp_cmeandev10 c.vl18_rii_cmeandev10 i.wave##c.cc_exp_cmean_mc10##c.vl18_rii_cmean_mc10##ib3.hhincome  ||countryno: ||countryyearno: 
margins i(1 2 3 4 5).hhincome#i(3 4).wave,  at( vl18_rii_cmean_mc10=(-1.8 )  cc_exp_cmean_mc10=(-1.31) ) post
marginsplot, name(f3lori, replace) recast(line) ciopts(recast(rline) lpattern(dash))   title("Low inequality") ytitle("")
*high inequality
melogit flfp_v3a_logit i.educ age i.female i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6 i.kids i.toddlers  i.paidwork_cat i.religious c.cc_exp_cmeandev10 c.vl18_rii_cmeandev10 i.wave##c.cc_exp_cmean_mc10##c.vl18_rii_cmean_mc10##ib3.hhincome   ||countryno: ||countryyearno: 
margins i(1 2 3 4 5).hhincome#i(3 4).wave,  at( vl18_rii_cmean_mc10=(2.8 )  cc_exp_cmean_mc10=(-1.16)) post
marginsplot, name(f3hiri, replace) recast(line) ciopts(recast(rline) lpattern(dash))   title("High inequality") ytitle("")

graph combine f3lori f3hiri, ycommon xcommon  rows(1) name(figure3, replace) title("") 


*********************************
*Supplementary material: 
*********************************

*Table A.1: Public childcare spending, inequality in childcare enrolment, and attitudes towards maternal employment; as average levels and changes over time
list countryno year cc_exp_cmean cc_exp_delta vl18_rii_cmean vl18_rii_delta flfp_v3a_logit_cmean if countrywaveindex==1 

*Table A.2: Multilevel random intercept logistic regressions: Attitudes towards maternal employment; controlling for female labor force participation ratio and unemployment rate; maximum likelihood estimates
*M1
melogit flfp_v3a_logit ib3.hhincome ib3.educ i.paidwork_cat i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6 age i.female i.kids i.toddlers i.religious  c.flfp_cmean c.flfp_cmeandev i.wave   ||countryno: ||countryyearno: 
*M2
melogit flfp_v3a_logit ib3.hhincome ib3.educ i.paidwork_cat i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6 age i.female i.kids i.toddlers i.religious  c.flfp_cmean c.flfp_cmeandev i.wave c.cc_exp_cmean_mc10 c.cc_exp_cmeandev10    ||countryno: ||countryyearno: 
*M3
melogit flfp_v3a_logit ib3.hhincome ib3.educ i.paidwork_cat i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6 age i.female i.kids i.toddlers i.religious  c.flfp_cmean c.flfp_cmeandev i.wave c.cc_exp_cmean_mc10 c.cc_exp_cmeandev10 c.vl18_rii_cmean_mc10 c.vl18_rii_cmeandev10   ||countryno: ||countryyearno: 
*M4
melogit flfp_v3a_logit ib3.hhincome ib3.educ i.paidwork_cat i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6 age i.female i.kids i.toddlers i.religious ue_mean ue_dev i.wave  ||countryno: ||countryyearno: 
*M5
melogit flfp_v3a_logit ib3.hhincome ib3.educ i.paidwork_cat i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6 age i.female i.kids i.toddlers i.religious ue_mean ue_dev i.wave c.cc_exp_cmean_mc10 c.cc_exp_cmeandev10   ||countryno: ||countryyearno: 
*M6
melogit flfp_v3a_logit ib3.hhincome ib3.educ i.paidwork_cat i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6 age i.female i.kids i.toddlers i.religious ue_mean ue_dev i.wave c.cc_exp_cmean_mc10 c.cc_exp_cmeandev10 c.vl18_rii_cmean_mc10 c.vl18_rii_cmeandev10   ||countryno: ||countryyearno:


*Table A.3: Multilevel random intercept regressions: Attitudes towards maternal employment; maximum likelihood estimates (Models underlying Figure 2)
*M1: pooled sample
melogit flfp_v3a_logit ib3.educ  age i.female i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6 i.kids i.toddlers  i.paidwork_cat i.religious  i.wave c.cc_exp_cmean_mc10 c.vl18_rii_cmeandev10 c.vl18_rii_cmean_mc10##c.cc_exp_cmeandev10##ib3.hhincome   ||countryno: ||countryyearno: 
*M2: women<45
melogit flfp_v3a_logit ib3.educ  age  i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6 i.kids i.toddlers  i.paidwork_cat i.religious  i.wave c.cc_exp_cmean_mc10 c.vl18_rii_cmeandev10 c.vl18_rii_cmean_mc10##c.cc_exp_cmeandev10##ib3.hhincome  if   female==1 & age<=45   ||countryno: ||countryyearno: 


*Table A.4: Multilevel random intercept regressions: Attitudes towards maternal employment; maximum likelihood estimates (Model underlying Figure 3)
melogit flfp_v3a_logit i.educ age i.female i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6 i.kids i.toddlers  i.paidwork_cat i.religious c.cc_exp_cmeandev10 c.vl18_rii_cmeandev10 i.wave##c.cc_exp_cmean_mc10##c.vl18_rii_cmean_mc10##ib3.hhincome ||countryno: ||countryyearno: 


*Figure A.1: Average marginal effects of changes in public childcare spending on attitudes towards maternal employment conditioned by inequality in childcare enrolment; by different sub-samples
*low inequality
*women<45
melogit flfp_v3a_logit ib3.educ  age  i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6 i.kids i.toddlers  i.paidwork_cat i.religious  i.wave c.cc_exp_cmean_mc10 c.vl18_rii_cmeandev10 c.vl18_rii_cmean_mc10##c.cc_exp_cmeandev10##ib3.hhincome       if   female==1 & age<=45    ||countryno: ||countryyearno: 
margins, dydx(cc_exp_cmeandev)  at(hhincome=(1(1)5) vl18_rii_cmean_mc10=(-1.8  ))
marginsplot, name(f2women, replace) recast(line) ciopts(recast(rline) lpattern(dash))  yline(0) title("Women below age 45") ytitle("")
*men<45
melogit flfp_v3a_logit ib3.educ  age  i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6 i.kids i.toddlers  i.paidwork_cat i.religious  i.wave c.cc_exp_cmean_mc10 c.vl18_rii_cmeandev10 c.vl18_rii_cmean_mc10##c.cc_exp_cmeandev10##ib3.hhincome       if   female==0 & age<=45   ||countryno: ||countryyearno: 
margins, dydx(cc_exp_cmeandev)  at(hhincome=(1(1)5) vl18_rii_cmean_mc10=(-1.8  ))
marginsplot, name(f2men, replace) recast(line) ciopts(recast(rline) lpattern(dash))  yline(0) title("Men below age 45") ytitle("")
*women>45
melogit flfp_v3a_logit ib3.educ  age  i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6 i.kids i.toddlers  i.paidwork_cat i.religious  i.wave c.cc_exp_cmean_mc10 c.vl18_rii_cmeandev10 c.vl18_rii_cmean_mc10##c.cc_exp_cmeandev10##ib3.hhincome       if   female==1 & age>45   ||countryno: ||countryyearno: 
margins, dydx(cc_exp_cmeandev)  at(hhincome=(1(1)5) vl18_rii_cmean_mc10=(-1.8  ))
marginsplot, name(f2women_o, replace) recast(line) ciopts(recast(rline) lpattern(dash))  yline(0) title("Women above age 45") ytitle("")
graph combine f2women f2men f2women_o, name(f2comb1, replace) ycommon row(1) title("Low inequality")
*high inequality
*women<45
melogit flfp_v3a_logit ib3.educ  age  i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6 i.kids i.toddlers  i.paidwork_cat i.religious  i.wave c.cc_exp_cmean_mc10 c.vl18_rii_cmeandev10 c.vl18_rii_cmean_mc10##c.cc_exp_cmeandev10##ib3.hhincome       if   female==1 & age<=45    ||countryno: ||countryyearno: 
margins, dydx(cc_exp_cmeandev)  at(hhincome=(1(1)5) vl18_rii_cmean_mc10=(2.8 ))
marginsplot, name(f2women, replace) recast(line) ciopts(recast(rline) lpattern(dash))  yline(0) title("Women below age 45") ytitle("")
*men<45
melogit flfp_v3a_logit ib3.educ  age  i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6 i.kids i.toddlers  i.paidwork_cat i.religious  i.wave c.cc_exp_cmean_mc10 c.vl18_rii_cmeandev10 c.vl18_rii_cmean_mc10##c.cc_exp_cmeandev10##ib3.hhincome       if  female==0 & age<=45    ||countryno: ||countryyearno: 
margins, dydx(cc_exp_cmeandev)  at(hhincome=(1(1)5) vl18_rii_cmean_mc10=(2.8 ))
marginsplot, name(f2men, replace) recast(line) ciopts(recast(rline) lpattern(dash))  yline(0) title("Men below age 45") ytitle("")
*women>45
melogit flfp_v3a_logit ib3.educ  age  i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6 i.kids i.toddlers  i.paidwork_cat i.religious  i.wave c.cc_exp_cmean_mc10 c.vl18_rii_cmeandev10 c.vl18_rii_cmean_mc10##c.cc_exp_cmeandev10##ib3.hhincome       if   female==1 & age>45    ||countryno: ||countryyearno: 
margins, dydx(cc_exp_cmeandev)  at(hhincome=(1(1)5) vl18_rii_cmean_mc10=(2.8 ))
marginsplot, name(f2women_o, replace) recast(line) ciopts(recast(rline) lpattern(dash))  yline(0) title("Women above age 45") ytitle("")
graph combine f2women f2men f2women_o, name(f2comb2, replace) ycommon row(1) title("High inequality")
graph combine f2comb1 f2comb2 , name(figure_a1_subgroups, replace) ycommon row(2)


*Figure A.2: Average marginal effects of changes in public childcare spending on parents´ attitudes towards maternal employment conditioned by inequality in childcare enrolment
*low inequality
*parents<45
melogit flfp_v3a_logit ib3.educ  age i.female i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6  i.paidwork_cat i.religious  i.wave c.cc_exp_cmean_mc10 c.vl18_rii_cmeandev10 c.vl18_rii_cmean_mc10##c.cc_exp_cmeandev10##ib3.hhincome       if (kids==1 | toddlers==1) & age<=45  ||countryno: ||countryyearno: 
margins, dydx(cc_exp_cmeandev)  at(hhincome=(1(1)5) vl18_rii_cmean_mc10=(-1.8  ))
marginsplot, name(f2, replace) recast(line) ciopts(recast(rline) lpattern(dash))  yline(0) title("Parents below age 45") ytitle("")
*mothers<45
melogit flfp_v3a_logit ib3.educ  age  i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6  i.paidwork_cat i.religious  i.wave c.cc_exp_cmean_mc10 c.vl18_rii_cmeandev10 c.vl18_rii_cmean_mc10##c.cc_exp_cmeandev10##ib3.hhincome       if  (kids==1 | toddlers==1) & female==1 & age<=45    ||countryno: ||countryyearno: 
margins, dydx(cc_exp_cmeandev)  at(hhincome=(1(1)5) vl18_rii_cmean_mc10=(-1.8  ))
marginsplot, name(f2women, replace) recast(line) ciopts(recast(rline) lpattern(dash))  yline(0) title("Mothers below age 45") ytitle("")
graph combine f2 f2women , name(f2comb1, replace) ycommon row(1) title("Low inequality")
*high inequality
*parents<45
melogit flfp_v3a_logit ib3.educ  age i.female i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6  i.paidwork_cat i.religious  i.wave c.cc_exp_cmean_mc10 c.vl18_rii_cmeandev10 c.vl18_rii_cmean_mc10##c.cc_exp_cmeandev10##ib3.hhincome       if  (kids==1 | toddlers==1) & age<=45    ||countryno: ||countryyearno: 
margins, dydx(cc_exp_cmeandev)  at(hhincome=(1(1)5) vl18_rii_cmean_mc10=(2.8 ))
marginsplot, name(f2, replace) recast(line) ciopts(recast(rline) lpattern(dash))  yline(0) title("Parents below age 45") ytitle("")
*mothers<45
melogit flfp_v3a_logit ib3.educ  age  i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6  i.paidwork_cat i.religious  i.wave c.cc_exp_cmean_mc10 c.vl18_rii_cmeandev10 c.vl18_rii_cmean_mc10##c.cc_exp_cmeandev10##ib3.hhincome       if  (kids==1 | toddlers==1) &female==1 & age<=45   ||countryno: ||countryyearno: 
margins, dydx(cc_exp_cmeandev)  at(hhincome=(1(1)5) vl18_rii_cmean_mc10=(2.8 ))
marginsplot, name(f2women, replace) recast(line) ciopts(recast(rline) lpattern(dash))  yline(0) title("Mothers below age 45") ytitle("")
graph combine f2 f2women  , name(f2comb2, replace) ycommon row(1) title("High inequality")

graph combine f2comb1 f2comb2 , name(figure_a2_parents, replace) ycommon row(2)



*Figure A.3: Average marginal effects of changes in public childcare spending on the likelihood of women below age 45 to be in paid work conditioned by inequality in childcare enrolment
*low inequality
*women<45
melogit paidwork ib3.educ  age  i.partner_new partner_educ2 partner_educ3 partner_educ4 i.kids i.toddlers  /*i.paidwork_cat*/ i.religious  i.wave c.cc_exp_cmean_mc10 c.vl18_rii_cmeandev10 c.vl18_rii_cmean_mc10##c.cc_exp_cmeandev10##ib3.hhincome if   female==1 & age<=45   ||countryno: ||countryyearno: 
margins, dydx(cc_exp_cmeandev)  at(hhincome=(1(1)5) vl18_rii_cmean_mc10=(-1.8  ))
marginsplot, name(f2women, replace) recast(line) ciopts(recast(rline) lpattern(dash))  yline(0) title("Women below age 45") ytitle("")
graph combine  f2women  , name(f2comb1, replace) ycommon row(1) title("Low inequality")
*high inequality
*women<45
melogit paidwork ib3.educ  age  i.partner_new partner_educ2 partner_educ3 partner_educ4 i.kids i.toddlers  /*i.paidwork_cat*/ i.religious  i.wave c.cc_exp_cmean_mc10 c.vl18_rii_cmeandev10 c.vl18_rii_cmean_mc10##c.cc_exp_cmeandev10##ib3.hhincome if female==1 & age<=45  ||countryno: ||countryyearno: 
margins, dydx(cc_exp_cmeandev)  at(hhincome=(1(1)5) vl18_rii_cmean_mc10=(2.8 ))
marginsplot, name(f2women, replace) recast(line) ciopts(recast(rline) lpattern(dash))  yline(0) title("Women below age 45") ytitle("")
graph combine  f2women  , name(f2comb2, replace) ycommon row(1) title("High inequality")
graph combine f2comb1 f2comb2 , name(figure_a3_empldv, replace) ycommon 


*Figure A.4: Average marginal effects of changes in public childcare spending on attitudes towards maternal employment conditioned by inequality in childcare enrolment; by educational attainment
melogit flfp_v3a_logit ib3.hhincome   age i.female i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6 i.kids i.toddlers  i.paidwork_cat i.religious  i.wave c.cc_exp_cmean_mc10 c.vl18_rii_cmeandev10 c.vl18_rii_cmean_mc10##c.cc_exp_cmeandev10##ib3.educ           ||countryno: ||countryyearno: 
margins, dydx(cc_exp_cmeandev)  at(educ=(1(1)3) vl18_rii_cmean_mc10=(-1.8  ))
marginsplot, name(f2, replace) recast(line) ciopts(recast(rline) lpattern(dash))  yline(0) title("Pooled sample") ytitle("")
melogit flfp_v3a_logit ib3.hhincome  age  i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6 i.kids i.toddlers  i.paidwork_cat i.religious  i.wave c.cc_exp_cmean_mc10 c.vl18_rii_cmeandev10 c.vl18_rii_cmean_mc10##c.cc_exp_cmeandev10##ib3.educ       if female==1 & age<=45    ||countryno: ||countryyearno: 
margins, dydx(cc_exp_cmeandev)  at(educ=(1(1)3) vl18_rii_cmean_mc10=(-1.8  ))
marginsplot, name(f2women, replace) recast(line) ciopts(recast(rline) lpattern(dash))  yline(0) title("Women below age 45") ytitle("")
graph combine f2 f2women, name(f2comb1, replace) ycommon row(1) title("Low inequality")
melogit flfp_v3a_logit ib3.hhincome  age i.female i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6 i.kids i.toddlers  i.paidwork_cat i.religious  i.wave c.cc_exp_cmean_mc10 c.vl18_rii_cmeandev10 c.vl18_rii_cmean_mc10##c.cc_exp_cmeandev10##ib3.educ           ||countryno: ||countryyearno: 
margins, dydx(cc_exp_cmeandev)  at(educ=(1(1)3) vl18_rii_cmean_mc10=(2.8 ))
marginsplot, name(f2, replace) recast(line) ciopts(recast(rline) lpattern(dash))  yline(0) title("Pooled sample") ytitle("")
melogit flfp_v3a_logit ib3.hhincome  age  i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6 i.kids i.toddlers  i.paidwork_cat i.religious  i.wave c.cc_exp_cmean_mc10 c.vl18_rii_cmeandev10 c.vl18_rii_cmean_mc10##c.cc_exp_cmeandev10##ib3.educ       if   female==1 & age<=45 ||countryno: ||countryyearno: 
margins, dydx(cc_exp_cmeandev)  at(educ=(1(1)3) vl18_rii_cmean_mc10=(2.8 ))
marginsplot, name(f2women, replace) recast(line) ciopts(recast(rline) lpattern(dash))  yline(0) title("Women below age 45") ytitle("")
graph combine f2 f2women  , name(f2comb2, replace) ycommon row(1) title("High inequality")
graph combine f2comb1 f2comb2 , name(figure_a4_educ, replace) ycommon row(2)


*Figure A.5: Predicted probabilities of support for maternal employment in 2002 and 2012 in low- and high-inequality countries; by educational attainment 
melogit flfp_v3a_logit i.hhincome  age i.female i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6 i.kids i.toddlers  i.paidwork_cat i.religious c.cc_exp_cmeandev10 c.vl18_rii_cmeandev10 i.wave##c.cc_exp_cmean_mc10##c.vl18_rii_cmean_mc10##ib3.educ      ||countryno: ||countryyearno: 
margins i(1 2 3).educ#i(3 4).wave,  at( vl18_rii_cmean_mc10=(-1.8 )  cc_exp_cmean_mc10=(-1.31) ) post
marginsplot, name(f3lori, replace) recast(line) ciopts(recast(rline) lpattern(dash))   title("Low inequality") ytitle("")
melogit flfp_v3a_logit i.hhincome age i.female i.partner_new partner_educ2 partner_educ3 partner_educ4 rel_inc2 rel_inc3 rel_inc4 rel_inc5 rel_inc6 i.kids i.toddlers  i.paidwork_cat i.religious c.cc_exp_cmeandev10 c.vl18_rii_cmeandev10 i.wave##c.cc_exp_cmean_mc10##c.vl18_rii_cmean_mc10##ib3.educ         ||countryno: ||countryyearno: 
margins i(1 2 3).educ#i(3 4).wave,  at( vl18_rii_cmean_mc10=(2.8 )  cc_exp_cmean_mc10=(-1.16)) post
marginsplot, name(f3hiri, replace) recast(line) ciopts(recast(rline) lpattern(dash))   title("High inequality") ytitle("")
graph combine f3lori f3hiri, ycommon xcommon  rows(1) name(figure_a5_educ, replace) title("") 


